package pri.syl.xiaowu.websocket.core.domain.builder;

import pri.syl.xiaowu.websocket.core.domain.HttpUpgradeRequest;
import io.netty.handler.codec.http.HttpHeaders;

import java.util.Map;

/**
 * @Author YunLong
 * @Date 2021/7/18 17:50
 * @Description 构造协议升级传递参数
 **/
public class HttpUpgradeRequestBuilder {
    private HttpUpgradeRequestBuilder() {
    }

    public static HttpUpgradeRequest builderHttpUpgradeRequest(HttpHeaders headers,
                                                               Map<String, String> uriVariable,
                                                               Map<String, String> uriParam) {
        HttpUpgradeRequest httpUpgradeRequest = new HttpUpgradeRequest();
        httpUpgradeRequest.setHeaders(headers);
        httpUpgradeRequest.setUriVariable(uriVariable);
        httpUpgradeRequest.setUriParam(uriParam);
        return httpUpgradeRequest;
    }
}
